import  request  from '@/utils/http'
//对params的类型进行定义-----------------------
interface GetHotGoodsParams {
    id: number;
    type: string;
    limit?: number;
}

export const getDetail = (id:any) => {
    return request({
        url: '/goods',
        params: {
            id
        }
    })
}

export const getHotGoodsAPI = ({ id, type, limit = 3 }: GetHotGoodsParams) => {
    return request({
        url: '/goods/hot',
        params: {
            id,
            type,
            limit
        }
    })
}